Mastering PowerCLI by Sajal Debnath

Mastering PowerCLI by Sajal Debnath

Author:Sajal Debnath [Debnath, Sajal]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2015-10-15T16:00:00+00:00


The output is as follows:

We can use the Set-VMGuestNetworkInterface cmdlet to set the network of a VM using VMware tools.

The Get-VMGuestRoute, New-VMGuestRoute, and Remove-VMGuestRoute cmdlets allow us to manage the route for the network interface of a guest operating system of a VM. In the following example, we can see the default gateway set for the LAB AD VM:

With the help of the last Invoke-VMScript cmdlet, we can remotely run a script in the operating system, in the virtual machine. In the following example, we are remotely executing the Dir C:\ command in the LAB AD VM to get a list of directories and files in the C drive:

PS C:\> Invoke-VMScript –VM 'Lab AD' –ScriptText 'Dir C:\' ` –GuestUser Administrator –GuestPassword Vmware1!



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.